package tw.com.softleader.spring.service.impl;

import java.util.List;

import tw.com.softleader.spring.dao.SpringDao;
import tw.com.softleader.spring.service.SpringService;

public class SpringServiceImpl implements SpringService{
	
	private String greeting;
	
	private List<String> vendors;
	
	private SpringDao springDao ;
	
	


	@Override
	public String getHello(String name){
		return greeting + name;
		
//		String vendorStr = "";
//		for(String vendor : vendors){
//			vendorStr += vendor + ";";
//		}
//		
//		return vendorStr  + " say Hi to " + name;
	}
	
	@Override
	public List<String> getAllFruits(){
		
		return springDao.getAll();
	}
	

	public void setGreeting(String greeting) {
		this.greeting = greeting;
	}

	

	public void setVendors(List<String> vendors) {
		this.vendors = vendors;
	}

	public void setSpringDao(SpringDao springDao) {
		this.springDao = springDao;
	}

	
}
